package cn.xlbweb.sso.repository;

import cn.xlbweb.sso.entity.ClientDTO;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @author: bobi
 * @date: 2019-03-17 22:54
 * @description:
 */
public interface ClientRepository extends JpaRepository<ClientDTO, Integer> {

    List<ClientDTO> findByToken(String token);

    @Transactional
    int deleteByToken(String token);
}
